﻿using System.Collections.ObjectModel;
using System.Configuration;

namespace PSE.Framework.Communication.Configuration.Adapters 
{
    /// <summary>
    /// Coleção de configurações de adapters de entrada
    /// </summary>
    /// 
    public abstract class AdapterConfigurationCollection : CommunicationConfigurationElementCollection
    {
        public new AdapterConfiguration this[int index]
        {
            get
            {
                return base[index] as AdapterConfiguration;
            }
            set
            {
                base[index] = value;
            }
        }

        public new AdapterConfiguration this[string key]
        {
            get
            {
                return base[key] as AdapterConfiguration;
            }
            set
            {
                base[key] = value;
            }
        }

        protected override object GetElementKey(ConfigurationElement element)
        {
            return ((AdapterConfiguration)element).Name;
        }

    }//end InputAdapterConfigurationCollection

}